home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 13
/
013.d81
/
line writer v_64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
1KB
|
34 lines
1 rem line writer for vic and c64
2 rem by stephen s. leven, august 1983
3 print chr$(14) : rem upper/lower case set
4 poke 53280,6 : poke 53281,1 : rem for commodore 64 only
5 print "[147][197]nter" : print" 1[146] single width printout"
6 print " 2[146] double width printout" : print" 3[146] end"
7 get n$ : if n$="" then 7
8 if val(n$)=1 then n=15 : m=79 : goto 12
9 if val(n$)=2 then n=14 : m=39 : goto 12
10 if val(n$)=3 then print"[147]"chr$(142) : goto63000
11 goto 5
12 print"f1 to exit":print "[212]ype:" : b$=""
14 print tab(m)chr$(171); : for j=1 to m+1 : print chr$(157); : next
15 print chr$(166); : rem cursor
19 if a$=chr$(34) then poke 212,0
20 get a$ : if a$="" then 20 : rem get one typed character
21 if a$=chr$(133) then 5
22 if a$=chr$(13) then print chr$(157)" ";tab(m)" "chr$(145); : goto 30
23 if a$=chr$(20) or a$=chr$(157) then a$=chr$(157) : goto 25
24 if asc(a$)<32 or (asc(a$)>127 and asc(a$)<160) then 20
25 if b$="" and a$=chr$(157) then 20
26 if a$=chr$(157) then b$=left$(b$,len(b$)-1) : goto 28
27 b$=b$+a$ : rem add a$ to end of b$ string
28 if a$=chr$(157) then print chr$(157)" ";
29 print chr$(157)a$chr$(166); : goto 19
30 ifb$="quit"thenrun
32 open 1,4,7 : rem data channel for printer
40 print#1, chr$(n)b$; : print#1 : poke 212,0 : print#1, chr$(15); : print
50 close 1 : rem close data channel
60 goto 12 : rem go back to step 1
63000 rem connect to l.s.
63002 print"[147]load"chr$(34)"payload"chr$(34)",8":print"run"
63004 poke631,13:poke632,13:poke198,2:end